CREATE TABLE [dbo].[TDPROG_PAGO]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_PROV] [dbo].[TD_VC_020] NOT NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_PROV] [dbo].[TD_VC_020] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDPROG_PA__NU_SE__2B7F66B9] DEFAULT ((0)),
[FE_PROG] [dbo].[TD_DT_001] NOT NULL,
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[IM_PROG] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDPROG_PA__IM_PR__2C738AF2] DEFAULT ((0)),
[IM_SALD] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDPROG_PA__IM_SA__2D67AF2B] DEFAULT ((0)),
[ST_DIST] [dbo].[TD_VC_001] NULL,
[ST_DOCU_CIER] [dbo].[TD_VC_001] NULL,
[TI_SITU] [dbo].[TD_VC_003] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDPROG_PA__CO_US__2E5BD364] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDPROG_PA__FE_US__2F4FF79D] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDPROG_PA__CO_US__30441BD6] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDPROG_PA__FE_US__3138400F] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDPROG_PAGO] ADD CONSTRAINT [PK__TDPROG_P__1F2F045C139DBB87] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_PROV], [CO_TIPO_DOCU], [NU_DOCU_PROV], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDPROG_PAGO] ADD CONSTRAINT [FK__TDPROG_PAGO__65C1E23E] FOREIGN KEY ([CO_EMPR], [CO_PROV], [CO_TIPO_DOCU], [NU_DOCU_PROV]) REFERENCES [dbo].[TMDOCU_PROV] ([CO_EMPR], [CO_PROV], [CO_TIPO_DOCU], [NU_DOCU_PROV])
GO
